<?php

/**
 * Usuario form.
 *
 * @package    fisio-ud
 * @subpackage form
 * @author     Johan AR <j3valentin@gmail.com>
 */
class UsuarioForm extends BaseUsuarioForm
{
  public function configure() {
    $this->widgetSchema['proyecto_curricular_id'] = new sfWidgetFormPropelChoice(
                    array(
                        'model' => 'ProyectoCurricular',
                        'add_empty' => true,
                        'order_by' => array('Nombre', 'asc')
                    )
    );

    $this->validatorSchema['email'] = new sfValidatorAnd(
                    array(
                        $this->validatorSchema['email'],
                        new sfValidatorEmail(),
                    ), array('required' => false),
                    array(
                        'required' => 'El correo electr&oacute;nico es necesario.',
                        'invalid' => 'El correo electr&oacute;nico no es v&aacute;lido.',
                    )
    );

    $this->widgetSchema->setLabels(array('email' => 'Correo electr&oacute;nico *'));

    unset($this['sf_guard_user_id'], $this['persona_id'], $this['updated_at']);
//    unset ( $this['sf_guard_user_id'], $this['persona_id'], $this['created_at'], $this['updated_at'] );
  }
}